import os

#detail = os.popen("ps -aux|grep '[[:space:]]PolicyNetwork_version.py'").readlines()
detail = os.popen("ps -aux|grep 'PolicyNetwork_version.py[[:space:]]'").readlines()

id_process = []
for process in detail:
    p_id = process.split()[1]
    os.system("kill %s" % p_id)
